// pages/my/my.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    imageUrl: "../../images/avatar/1.png",
    latitude: "30.552550",
    longitude: "114.504760",
    scale: "18",
    showCompass: true,
    markers: [{
      iconPath: "/images/zb.png",
      id: 0,
      longitude: 114.504216,
      latitude: 30.552472,
      width: 30,
      height: 30
    }],
    polyline: [{
      points: [{
        longitude: 114.504216,
        latitude: 30.552472
      }, {
        longitude: 114.433850,
        latitude: 30.461540,
      }],
      color: "#FF0000DD",
      width: 2,
      dottedLine: true
    }],
    circles: [{
      longitude: 114.504216,
      latitude: 30.552472,
      radius: 50,
      fillColor: "#C20C0C66"
    }]
  },
  onLoad: function () {
    var img = wx.getStorageSync('logoimg');
    if (img) {
      this.setData({
        imageUrl: img
      })
    }
  },
  handleImage() {
    wx.chooseImage({
      count: 9,
      sizeType: ['original', 'compressed'],
      sourceType: ['album', 'camera'],
      success: (result) => {
        const src = result.tempFilePaths[0]
        wx.setStorageSync('logoimg', src);
        this.setData({
          imageUrl: src
        })
      },

    });

  }


})